package com.example.dytest.user.controller;


import cn.hutool.json.JSONUtil;
import com.example.dytest.user.entity.User;
import com.example.dytest.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jobob
 * @since 2021-07-16
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private IUserService userService;

    @GetMapping
    public List<User> list(){
        List<User> list = userService.mySelect();
        return list;
    }


    @GetMapping("/header")
    public List<User> listHeader(){
        List<User> list = userService.selectSpelByHeader();
        return list;
    }

}
